<template>
  <div class="action-bar">
    <div class="chat">
      <img src="@/assets/img/detail/icon_chat.png" alt="">
      <span class="text">聊天</span>
    </div>
    <div class="price">
      <div class="new-price">¥{{ currentHouse.finalPrice }}</div>
      <div class="unit">{{ currentHouse.priceMark }}</div>
      <div class="old-price">{{ currentHouse.productPrice }}</div>
    </div>
    <div class="order">
      <i class="icon"></i>
      <span class="text">预订当前房源</span>
    </div>
  </div>
</template>

<script setup>
  defineProps({
    currentHouse: {
      type: Object,
      default: () => ({})
    }
  })
</script>

<style lang="less" scoped>
  .action-bar {
    position: fixed;
    z-index: 99;
    background-color: #fff;
    bottom: 0;
    right: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;

    border-top: solid 1px #f3f3f3;
    .chat {
      padding: 0 15px;
      display: flex;
      justify-content: center;
      flex-direction: column;

      border-right: 1px solid #f3f3f3;
      img {
        width: 17px;
        height: 17px;
      }

      .text {
        font-size: 12px;
        color: #000;
        margin-top: 5px;
      }
    }

    .price {
      display: flex;
      align-items: center;
      font-size: 12px;
      color: #666;

      .new-price {
        color: var(--primary-color);
        font-size: 16px;
        font-weight: 700;
      }

      .unit {
        margin: 0 6px;
      }

      .old-price {
        text-decoration: line-through;
      }
    }

    .order {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 150px;
      height: 100%;
      background: linear-gradient(90deg, #fa8c1d, #fcaf3f);

      .icon {
        display: block;
        width: 14px;
        height: 17px;
        background: url(@/assets/img/detail/icon_order.png) 0 0 / 100% 100%;
      }

      .text {
        margin-left: 5px;
        font-size: 18px;
        color: #fff;
      }
    }
  }
</style>